package com.clouddancer.config;

import dev.langchain4j.model.openai.OpenAiChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AiConfig {

    @Bean  // 将OpenAI模型注入Spring容器
    public OpenAiChatModel openAiChatModel() {
        return OpenAiChatModel.builder()
                .baseUrl("https://api.deepseek.com/v1")
                .apiKey("sk-cb30bcf282684a2fafbc8a1be96cc24c")  // 替换为你的API密钥
                .modelName("deepseek-chat")   // 或 "gpt-4"
                .temperature(0.7)           // 控制生成随机性
                .build();
    }
}
